﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace MyMovies
{
    public partial class duplicatedForm : Form
    {
        private List<FileDuplicated> files;

        public duplicatedForm(List<FileDuplicated> files)
        {
            InitializeComponent();
            this.files = files;
        }

        protected override void OnShown(EventArgs e)
        {
            foreach (FileDuplicated file in files)
            {
                ListViewItem lvi = new ListViewItem(file.Path1);
                lvi.SubItems.Add(file.Path2);
                lvi.SubItems.Add(file.File);

                listView1.Items.Add(lvi);
            }
            foreach (ColumnHeader col in listView1.Columns)
                col.Width = -2;
            base.OnShown(e);
        }
    }
}